This is Info file zsh.info, produced by Makeinfo-1.63 from the input file ./zsh.texi. This is a texinfo version of the man page for the Z Shell, originally by Paul Falstad. It was converted from the `zsh.1' file distributed with zsh v2.5.0 by Jonathan Hardwick, `jch@cs.cmu.edu' and updated/modified by Clive Messer, `clive@epos.demon.co.uk' to it's present state. File: zsh.info, Node: Array Parameters, Next: Positional Parameters, Up: Parameters Array Parameters ================ The value of an array parameter may be assigned by writing: NAME=(VALUE ...) ... Individual elements of an array may be selected using a subscript. A subscript of the form `[EXP]' selects the single element EXP, where EXP is an arithmetic expression which will be subject to arithmetic expansion as if it were surrounded by `$((...))'. The elements are numbered beginning with 1 unless the `KSH_ARRAYS' option is set when they are numbered from zero. A subscript of the form `[*]' or `[@]' evaluates to all elements of an array; there is no difference between the two except when they appear within double quotes. `"$foo[*]"' evaluates to `"$foo[1] $foo[2] ..."', while `"$foo[@]"' evaluates to `"$foo[1]"' `"$foo[2]"', etc. A subscript of the form `[EXP1,EXP2]' selects all elements in the range EXP1 to EXP2, inclusive. If one of the subscripts evaluates to a negative number, say `-N', then the N'th element from the end of the array is used. Thus `$foo[-3]' is the third element from the end of the array `foo', and `$foo[1,-1]' is the same as `$foo[*]'. Subscripting may also be performed on non-array values, in which case the subscripts specify a substring to be extracted. For example, if `FOO' is set to `foobar', then `echo $FOO[2,5]' prints `ooba'. If a subscript is used on the left side of an assignment the selected range is replaced by the expression on the right side. If the opening bracket or the comma is directly followed by an opening parenthesis the string up to the matching closing parenthesis is considered to be a list of flags. The flags currently understood are: This option has no effect and retained for backward compatibility only. If the parameter subscripted is a scalar, then this flag makes subscription work on a per-word basis instead of characters. `s:STRING:' Defines the STRING that separates words (for use with the `w' flag). Recognize the same escape sequences as the `print' builtin in the string argument of a subsequent `s' flag. If the parameter subscripted is a scalar than this flag makes subscription work on a per-line basis instead of characters. This is a shorthand for `pws:\n:'. If this flag is given the exp is taken as a pattern and the result is the first matching array element, substring or word (if the parameter is an array, if it is a scalar, or if it is a scalar and the `w' flag is given, respectively); note that this is like giving a number: `$foo[(r)??,3]' and `$foo[(r)??,(r)f*]' work. Like `r', but gives the last match. Like `r', but gives the index of the match instead; this may not be combined with a second argument. Like `i', but gives the index of the last match. `n:EXPR:' If combined with `r', `R', `i', or `I', makes them return the N'th or N'th last match (if EXPR evaluates to N). File: zsh.info, Node: Positional Parameters, Next: Parameters Set By The Shell, Prev: Array Parameters, Up: Parameters Positional Parameters ===================== Positional parameters are set by the shell on invocation, by the `set' builtin, or by direct assignment. The parameter N, where N is a number, is the N'th positional parameter. The parameters `*', `@', and `argv' are arrays containing all the positional parameters; thus `argv[N]', is equivalent to simply N. File: zsh.info, Node: Parameters Set By The Shell, Next: Parameters Used By The Shell, Prev: Positional Parameters, Up: Parameters Parameters Set By The Shell =========================== The following parameters are automatically set by the shell: The process id of the last background command invoked. The number of positional parameters in decimal. `ARGC' Same as `#'. It has no special meaning in sh/ksh compatibility mode. The process id of this shell. Flags supplied to the shell on invocation or by the `set' or `setopt' commands. An array containing the positional parameters. `argv' Same as `*'. It has no special meaning in sh/ksh compatibility mode. Same as `argv[@]' but it can be used in sh/ksh compatibility mode. The exit value returned by the last command. `status' Same as `?'. It has no special meaning in sh/ksh compatibility mode. The last argument of the previous command. Also, this parameter is set in the environment of every command executed to the full pathname of the command. `EGID' The effective group id of the shell process. If you have sufficient privileges, you may change the effective group id of the shell process by assigning to this parameter. Also (assuming sufficient privileges), you may start a single command with a different effective group id by: `EGID=egid command' `EUID' The effective user id of the shell process. If you have sufficient privileges, you may change the effective user id of the shell process by assigning to this parameter. Also (assuming sufficient privileges), you may start a single command with a different effective user id by: `EUID=euid command' `ERRNO' The value of `errno' as set by the most recently failed system call. This value is system dependent and is intended for debugging purposes. `GID' The group id of the shell process. If you have sufficient privileges, you may change the group id of the shell process by assigning to this parameter. Also (assuming sufficient privileges), you may start a single command under a different group id by: `GID=gid command' `HOST' The current hostname. `LINENO' The line number of the current line within the current script being executed. `LOGNAME' If the corresponding variable is not set in the environment of the shell, it is initialized to the login name corresponding to the current login session. This parameter is exported by default but this can be disabled using the `typeset' builtin. `MACHTYPE' The machine type (microprocessor class or machine model), as determined at compile time. `OLDPWD' The previous working directory. `OPTARG' The value of the last option argument processed by the `getopts' command. `OPTIND' The index of the last option argument processed by the `getopts' command. `OSTYPE' The operating system, as determined at compile time. `PPID' The process id of the parent of the shell. `PWD' The present working directory. `RANDOM' A random integer from 0 to 32767, newly generated each time this parameter is referenced. The random number generator can be seeded by assigning a numeric value to `RANDOM'. `SECONDS' The number of seconds since shell invocation. If this parameter is assigned a value, then the value returned upon reference will be the value that was assigned plus the number of seconds since the assignment. `SHLVL' Incremented by one each time a new shell is started. `signals' An array containing the names of the signals. `TTY' The name of the tty associated with the shell, if any. `TTYIDLE' The idle time of the tty associated with the shell in seconds or -1 if there is no such tty. `UID' The user id of the shell process. If you have sufficient privileges, you may change the user id of the shell by assigning to this parameter. Also (assuming sufficient privileges), you may start a single command under a different user id by: `UID=uid command' `USERNAME' The username corresponding to the user id of the shell process. If you have sufficient privileges, you may change the username (and also the user id and group id) of the shell by assigning to this parameter. Also (assuming sufficient privileges), you may start a single command under a different username (and user id and group id) by: `USERNAME=username command' `VENDOR' The vendor, as determined at compile time. `ZSHNAME' `ZSH_NAME' Expands to the basename of the command used to invoke this instance of zsh. `ZSH_VERSION' The version number of this zsh. File: zsh.info, Node: Parameters Used By The Shell, Prev: Parameters Set By The Shell, Up: Parameters Parameters Used By The Shell ============================ The following parameters are used by the shell: `ARGV0' If exported, its value is used as argv[0] of external commands. Usually used in constructs like `ARGV0=emacs nethack'. `BAUD' The baud rate of the current connection. Used by the line editor update mechanism to compensate for a slow terminal by delaying updates until necessary. This may be profitably set to a lower value in some circumstances, e.g. for slow modems dialing into a communications server which is connected to a host via a fast link; in this case, this variable would be set by default to the speed of the fast link, and not the modem. This parameter should be set to the baud rate of the slowest part of the link for best performance. The compensation mechanism can be turned off by setting the variable to zero. `cdpath (CDPATH)' An array (colon-separated list) of directories specifying the search path for the `cd' command. `COLUMNS' The number of columns for this terminal session. Used for printing select lists and for the line editor. `DIRSTACKSIZE' The maximum size of the directory stack. If the stack gets larger than this, it will be truncated automatically. This is useful with the `AUTO_PUSHD' option. `FCEDIT' The default editor for the `fc' builtin. `fignore (FIGNORE)' An array (colon-separated list) containing the suffixes of files to be ignored during filename completion. But if the completion generates only files which would match if this variable would be ignored, than these files are completed anyway. `fpath (FPATH)' An array (colon-separated list) of directories specifying the search path for function definitions. This path is searched when a function with the `-u' attribute is referenced. If an executable file is found, then it is read and executed in the current environment. `histchars' Three characters used by the shell's history and lexical analysis mechanism. The first character signals the start of a history substitution (default `!'). The second character signals the start of a quick history substitution (default `^'). The third character is the comment character (default `#'). `HISTCHARS' Depreciated. Use `histchars'. `HISTFILE' The file to save the history in when an interactive shell exits. If unset, the history is not saved. `HISTSIZE' The maximum size of the history list. `HOME' The default argument for the `cd' command. `IFS' Internal field separators, normally space, tab, and newline, that are used to separate words which result from command or parameter substitution and words read by the `read' builtin. Any characters from the set space, tab and newline that appear in the `IFS' are called "IFS white space". One or more IFS white space characters or one non-IFS white space character together with any adjacent IFS white space character delimit a field. If an IFS white space character appears twice consecutively in the `IFS', this character is treated as if it were not an IFS white space character. `KEYTIMEOUT' The time the shell waits, in hundredths of seconds, for another key to be pressed when reading bound multi-character sequences. `LINES' The number of lines for this terminal session. Used for printing select lists and for the line editor. `LISTMAX' In the line editor, the number of filenames to list without asking first. If set to zero, the shell asks only if the listing would scroll off the screen. `LOGCHECK' The interval in seconds between checks for login/logout activity using the `watch' parameter. `MAIL' If this parameter is set and `mailpath' is not set, the shell looks for mail in the specified file. `MAILCHECK' The interval in seconds between checks for new mail. `mailpath (MAILPATH)' An array (colon-separated list) of filenames to check for new mail. Each filename can be followed by a `?' and a message that will be printed. The message will undergo parameter expansion, command substitution and arithmetic substitution with the variable `$_' defined as the name of the file that has changed. The default message is `You have new mail'. If an element is a directory instead of a file the shell will recursively check every file in every subdirectory of the element. `manpath (MANPATH)' An array (colon-separated list) whose value is not used by the shell. The `manpath' array can be useful, however, since setting it also sets `MANPATH', and vice versa. `NULLCMD' The command name to assume if a redirection is specified with no command. Defaults to `cat'. For sh/ksh-like behaviour, change this to `:'. For csh-like behaviour, unset this parameter; the shell will print an error message if null commands are entered. `path (PATH)' An array (colon-separated list) of directories to search for commands. When this parameter is set, each directory is scanned and all files found are put in a hash table. `POSTEDIT' This string is output whenever the line editor exits. It usually contains termcap strings to reset the terminal. `PS1' The primary prompt string, printed before a command is read; the default is `%m%# '. If the escape sequence takes an optional integer, it should appear between the `%' and the next character of the sequence. The following escape sequences are recognized: `%%' A `%'. `%)' A `)'. `%d' `%/' Present working directory (`$PWD'). `%~' `$PWD'. If it has a named directory as its prefix, that part is replaced by a `~' followed by the name of the directory. If it starts with `$HOME', that part is replaced by a `~'. `%c' `%.' `%C' Trailing component of `$PWD'. An integer may follow the `%' to get more than one component. Unless `%C' is used, tilde expansion is performed first. `!' `%h' `%!' Current history event number. `%M' The full machine hostname. `%m' The hostname up to the first `.'. An integer may follow the `%' to specify how many components of the hostname are desired. `%S (%s)' Start (stop) standout mode. `%U (%u)' Start (stop) underline mode. `%B (%b)' Start (stop) boldface mode. `%t' `%@' Current time of day, in 12-hour, am/pm format. `%T' Current time of day, in 24-hour format. `%*' Current time of day in 24-hour format, with seconds. `%n' `$USERNAME'. `%w' The date in day-dd format. `%W' The date in mm/dd/yy format. `%D' The date in yy-mm-dd format. `%D{STRING}' STRING is formatted using the `strftime' function. See `strftime(3)' for more details, if your system has it. `%l' The line (tty) the user is logged in on. `%?' The return code of the last command executed just before the prompt. `%_' The status of the parser, i.e. the shell constructs (like `if' and `for') that have been started on the command line. If given an integer number, that many strings will be printed. `%E' Clears to end of line. `%#' A `#' if the shell is running as root, a `%' if not. Equivalent to `%(#.#.%%)' `%v' The value of the first element of the `psvar' array parameter. Following the `%' with an integer gives that element of the array. `%{...%}' Include a string as a literal escape sequence. The string within the braces should not change the cursor position. `%(x.TRUE-TEXT.FALSE-TEXT)' Specifies a ternary expression. The character following the `x' is arbitrary; the same character is used to separate the text for the true result from that for the false result. The separator may not appear in the `true-text', except as part of a `%' sequence. A `)' may appear in the `false-text' as a `%)'. `true-text' and `false-text' may both contain contain arbitrarily-nested escape sequences, including further ternary expressions. The left parenthesis may be preceded or followed by a positive integer `n', which defaults to zero. The test character `x' may be any of the following: `c' `.' `~' True if the current path, with prefix replacement, has at least N elements. `/' `C' True if the current absolute path has at least N elements. `t' True if the time in minutes is equal to N. `T' True if the time in hours is equal to N. `d' True if the day of the month is equal to N. `D' True if the month is equal to N (January = 0). `w' True if the day of the week is equal to N (Sunday = 0). `?' True if the exit status of the last command was N. `#' True if the effective uid of the current process is N. `g' True if the effective gid of the current process is N. `L' True if the `SHLVL' parameter is at least N. `S' True if the `SECONDS' parameter is at least N. `v' True if the array `psvar' has at least N elements. `_' True if at least N shell constructs were started. `%STRING>' `%[XSTRING]' Specifies truncation behaviour. The third form is equivalent to `%XSTRINGX', i.e. `X' may be `<' or `>'. The numeric argument, which in the third form may appear immediately after the `[', specifies the maximum permitted length of the various strings that can be displayed in the prompt. If this integer is zero, or missing, truncation is disabled. Truncation is initially disabled. The forms with `<' truncate at the left of the string, and the forms with `>' truncate at the right of the string. For example, if the current directory is `/home/pike', the prompt `%8<..<%/' will expand to `..e/pike'. The `string' will be displayed in place of the truncated portion of any string. In this string, the terminating character (`<', `>' or `]'), or in fact any character, may be quoted by a preceding `\'. `%' sequences are not treated specially. If the `string' is longer than the specified truncation length, it will appear in full, completely replacing the truncated string. `PS2' The secondary prompt, printed when the shell needs more information to complete a command. Recognizes the same escape sequences as `$PS1'. The default is `> '. `PS3' Selection prompt used within a `select' loop. Recognizes the same escape sequences as `PS1'. The default is `?# '. `PS4' The execution trace prompt. Default is `+ '. `PROMPT' `PROMPT2' `PROMPT3' `PROMPT4' Same as `PS1', `PS2', `PS3', and `PS4', respectively. These parameters do not have any special meaning in sh/ksh compatibility mode. `psvar (PSVAR)' An array (colon-separated list) whose first nine values can be used in `PROMPT' strings. Setting `psvar' also sets `PSVAR', and vice versa. `prompt' Same as `PS1'. It has no special meaning in sh/ksh compatibility mode. `READNULLCMD' The command name to assume if a single input redirection is specified with no command. Defaults to `more'. `REPORTTIME' If nonzero, commands whose combined user and system execution times (measured in seconds) are greater than this value have timing statistics printed for them. `RPROMPT' `RPS1' This prompt is displayed on the right-hand side of the screen when the primary prompt is being displayed on the left. This does not work if the `SINGLELINEZLE' option is set. Recognizes the same escape sequences as `PROMPT'. `SAVEHIST' The maximum number of history events to save in the history file. `SPROMPT' The prompt used for spelling correction. The sequence `%R' expands to the string which presumably needs spelling correction, and `%r' expands to the proposed correction. All other `PROMPT' escapes are also allowed. `STTY' If this parameter is set in a command's environment, the shell runs the `stty' command with the value of this parameter as arguments in order to set up the terminal before executing the command. The modes apply only to the command, and are reset when it finishes or is suspended. If the command is suspended and continued later with the `fg' or `wait' builtins it will see the modes specified by `STTY', as if it were not suspended. This (intentionally) does not apply if the command is continued via `kill -CONT'. `STTY' is ignored if the command is run in the background, or if it is in the environment of the shell but not explicitly assigned to in the input line. This avoids running `stty' at every external command by accidentally exporting it. Also note that `STTY' should not be used for window size specifications; these will not be local to the command. `TIMEFMT' The format of process time reports with the `time' keyword. The default is `%E real %U user %S system %P %J'. Recognizes the following escape sequences: `%' A `%'. `%U' CPU seconds spent in user mode. `%S' CPU seconds spent in kernel mode. `%E' Elapsed time in seconds. `%P' The CPU percentage, computed as (%U+%S)/%E. `%J' The name of this job. A star may be inserted between the percent sign and flags printing time. This cause the time to be printed in `hh:mm:ss.ttt' format (hours and minutes are only printed if they are not zero). `TMOUT' If this parameter is nonzero, the shell will receive an `ALRM' signal if a command is not entered within the specified number of seconds after issuing a prompt. If there is a trap on `SIGALRM', it will be executed and a new alarm is scheduled using the value of the `TMOUT' parameter after executing the trap. If no trap is set, and the idle time of the terminal is not less than the value of the `TMOUT' parameter, zsh terminates. Otherwise a new alarm is scheduled to `TMOUT' seconds after the last keypress. `TMPPREFIX' A pathname prefix which the shell will use for all temporary files. Note that this should include an initial part for the file name as well as any directory names. The default is `/tmp/zsh'. `watch (WATCH)' An array (colon-separated list) of login/logout events to report. If it contains the single word `all', then all login/logout events are reported. If it contains the single word `notme', then all login/logout events are reported except for those originating from `$USERNAME'. An entry in this list may consist of a username, an `@' followed by a remote hostname, and a `%' followed by a line (tty). Any or all of these components may be present in an entry; if a login/logout event matches all of them, it is reported. `WATCHFMT' The format of login/logout reports if the `watch' parameter is set. Default is `%n has %a %l from %m'. Recognizes the following escape sequences: `%n' The name of the user that logged in/out. `%a' The observed action, i.e. `logged on' or `logged off'. `%l' The line (tty) the user is logged in on. `%M' The full hostname of the remote host. `%m' The hostname up to the first `.'. If only the IP address is available or the utmp field contains the name of an X-windows display, the whole name is printed. NOTE: The `%m' and `%M' escapes will work only if there is a host name field in the `utmp' on your machine. Otherwise they are treated as ordinary strings. `%S (%s)' Start (stop) standout mode. `%U (%u)' Start (stop) underline mode. `%B (%b)' Start (stop) boldface mode. `%t' `%@' The time, in 12-hour, am/pm format. `%T' The time, in 24-hour format. `%w' The date in day-dd format. `%W' The date in mm/dd/yy format. `%D' The date in yy-mm-dd format. `%(x:TRUE-TEXT:FALSE-TEXT)' Specifies a ternary expression. The character following the `x' is arbitrary; the same character is used to separate the text for the true result from that for the false result. Both the separator and the right parenthesis may be escaped with a backslash. Ternary expressions may be nested. The test character `x' may be any one of `l', `n', `m', or `M', which indicate a true result if the corresponding escape sequence would return a non-empty value; or it may be `a', which indicates a true result if the watched user has logged in, or false if he has logged out. Other characters evaluate to neither true nor false; the entire expression is omitted in this case. If the result is true, then the TRUE-TEXT is formatted according to the result above and printed, and the FALSE-TEXT is skipped. If false, the TRUE-TEXT is skipped, and the FALSE-TEXT is formatted and printed. Either or both of the branches may be empty, but both separators must always be present. `WORDCHARS' A list of non-alphanumeric characters considered part of a word by the line editor. `ZDOTDIR' The directory to search for shell startup files (`.zshrc', etc), if not `$HOME'. File: zsh.info, Node: Options, Next: Shell Builtin Commands, Prev: Parameters, Up: Top Options ******* The following options may be set upon invocation of the shell, or with the `set', `setopt', and `unsetopt' builtins. They are case-insensitive and underscores are ignored, that is, `allexport' is equivalent to `A__lleXP_ort'. The single letter names given in parentheses can be used when invoking the shell, or with the builtin commands `set', `setopt' and `unsetopt'. If the shell is invoked as `sh' or `ksh', the single letter names marked by `ksh:' are used instead. `ALL_EXPORT (-a, ksh: -a)' All parameters subsequently defined are automatically exported. `ALWAYS_LAST_PROMPT' If unset, key functions that list completions try to return to the last prompt if given a numeric argument. If set, these functions try to return to the last prompt if given no numeric argument. `ALWAYS_TO_END' If a completion with the cursor in the word was started and it results in only one match, the cursor is placed at the end of the word. `APPEND_HISTORY' If this is set, zsh sessions will append their history list to the history file, rather than overwrite it. Thus, multiple parallel zsh sessions will all have their history lists added to the history file, in the order they are killed. *Note Shell Builtin Commands::, for the `fc' command. `AUTO_CD (-J)' If a command is not in the hash table, and there exists an executable directory by that name, perform the `cd' command to that directory. `AUTO_LIST (-9)' Automatically list choices on an ambiguous completion. `AUTO_MENU' Automatically use menu completion after the second consecutive request for completion, for example by pressing the TAB key repeatedly. This option is overridden by `MENU_COMPLETE'. `AUTO_NAME_DIRS' Any parameter that is set to the absolute name of a directory immediately becomes a name for that directory in the usual form `~param'. If this option is not set, the parameter must be used in that form for it to become a name (a command-line completion is sufficient for this). `AUTO_PARAM_KEYS' If a parameter name was completed and the next character typed is one of those that have to come directly after the name (like `}', `:', etc.), they are placed there automatically. `AUTO_PARAM_SLASH' If a parameter is completed whose content is the name of a directory, then add a trailing slash. `AUTO_PUSHD (-N)' Make `cd' push the old directory onto the directory stack. `AUTO_REMOVE_SLASH' When the last character resulting from a completion is a slash and the next character typed is a word delimiter, remove the slash. `AUTO_RESUME (-W)' Treat single word simple commands without redirection as candidates for resumption of an existing job. `BGNICE (-6)' Run all background jobs at a lower priority. This option is set by default. `BRACE_CCL' Expand expressions in braces which would not otherwise undergo brace expansion to a lexically ordered list of all the characters. *Note Brace Expansion::. `BSD_ECHO' Make the echo builtin compatible with the BSD `echo(1)' command. This disables backslashed escape sequences in echo strings unless the `-e' option is specified. `CDABLE_VARS (-T)' If the argument to a `cd' command (or an implied `cd' with the `AUTO_CD' option set) is not a directory, and does not begin with a slash, try to expand the expression as if it were preceded by a `~' (*note Filename Expansion::.). `CHASE_LINKS (-w)' Resolve symbolic links to their true values. `COMPLETE_ALIASES' If set, aliases on the command line are not internally substituted before completion is attempted. `COMPLETE_IN_WORD' If unset, the cursor is moved to the end of the word if completion is started. Otherwise it stays where it is and completion is done from both ends. `CORRECT (-0)' Try to correct the spelling of commands. `CORRECT_ALL (-O)' Try to correct the spelling of all arguments in a line. `CSH_JUNKIE_HISTORY' A history reference without an event specifier will always refer to the previous command. `CSH_JUNKIE_LOOPS' Allow loop bodies to take the form `LIST; end' instead of `do LIST; done'. `CSH_JUNKIE_QUOTES' Complain if a quoted expression runs off the end of a line; prevent quoted expressions from containing un-escaped newlines. `CSH_NULL_GLOB' If a pattern for filename generation has no matches, delete the pattern from the argument list; do not report an error unless all the patterns in a command have no matches. Overrides `NULL_GLOB'. `ERR_EXIT (-e, ksh: -e)' If a command has a non-zero exit status, execute the `ZERR' trap, if set, and exit. This is disabled while running initialization scripts. `EXTENDED_GLOB' Treat the `#', `~' and `^' characters as part of patterns for filename generation, etc. (An initial unquoted `~' always produces named directory expansion (*note Filename Expansion::.).) `EXTENDED_HISTORY' Save beginning and ending timestamps to the history file. The format of these timestamps is `:::'. `GLOB_ASSIGN' If this option is set, filename generation is performed on the right hand side of parameter assignments. If the result has more than one word the parameter will become an array. This was the default behaviour in earlier versions of zsh but it is incompatible with sh and ksh. Also it is not possible to tell in advance whether the result will be a scalar or an array. This option is provided for backwards compatibility only. Globbing is always performed on the right hand side of `NAME=( VALUE )' array assignments regardless of this option. `GLOB_COMPLETE' When the current word has a glob pattern, do not insert all the words resulting from the expansion but cycle through them like `MENU_COMPLETE'. If no matches are found, a `*' is added to the end of the word, or inserted at the cursor if `COMPLETE_IN_WORD' is set, and completion is attempted again. Using patterns works not only for files but for all completions, such as options, user names, etc. `GLOB_DOTS (-4)' Do not require a leading `.' in a filename to be matched explicitly. `GLOB_SUBST' Treat any characters resulting from parameter substitution as being eligible for file expansion and filename generation, and any characters resulting from command substitution as being eligible for filename generation. `HASH_CMDS' Place the location of each command in the hash table the first time it is executed. If this option is unset, no path hashing will be done at all. `HASH_DIRS' Whenever a command is executed, hash the directory containing it, as well as all directories that occur earlier in the path. Has no effect if `HASH_CMDS' is unset. `HASH_LIST_ALL' Whenever a command completion is attempted, make sure the entire command path is hashed first. This makes the first completion slower. `HIST_ALLOW_CLOBBER' Add `|' to output redirections in the history. This allows history references to clobber files even when `NO_CLOBBER' is set. `HIST_IGNORE_DUPS (-h)' Do not enter command lines into the history list if they are duplicates of the previous event. `HIST_IGNORE_SPACE (-g)' Do not enter command lines into the history list if they begin with a blank. `HIST_NO_STORE' Remove the `history' (`fc -l') command from the history when invoked. `HIST_VERIFY' Whenever the user enters a line with history substitution, don't execute the line directly; instead, perform history substitution and reload the line into the editing buffer. `IGNORE_BRACES (-I)' Do not perform brace expansion. `IGNORE_EOF (-7)' Do not exit on end-of-file. Require the use of `exit' or `logout' instead. `INTERACTIVE (-i, ksh: -i)' This is an interactive shell. This option is set upon initialisation if the standard input is a tty and commands are being read from standard input. (See the discussion of `SHIN_STDIN'.) This heuristic may be overridden by specifying a state for this option on the command line. The value of this option cannot be changed anywhere other than the command line. `INTERACTIVE_COMMENTS (-k)' Allow comments even in interactive shells. `KSH_ARRAYS' Emulate ksh array handling as closely as possible. If this option is set, array elements are numbered from zero and an array parameter without subscript refers to the first element instead of the whole array. `KSH_OPTION_PRINT' Alters the way options settings are printed. `LIST_AMBIGUOUS' If this option is set completions are shown only if the completions don't have an unambiguous prefix or suffix that could be inserted in the command line. `LIST_TYPES (-X)' When listing files that are possible completions, show the type of each file with a trailing identifying mark. `LOCAL_OPTIONS' If this option is set at the point of return from a shell function, all the options (including this one) which were in force upon entry to the function are restored. Otherwise, only this option and the `XTRACE' and `PRINT_EXIT_VALUE' options are restored. Hence if this is explicitly unset by a shell function the other options in force at the point of return will remain so. `LOGIN (-l, ksh: -l)' This is a login shell. `LONG_LIST_JOBS (-R)' List jobs in the long format by default. `MAGIC_EQUAL_SUBST' All unquoted arguments of the form `IDENTIFIER=EXPRESSION' have file expansion performed on EXPRESSION as if it were a parameter assignment, although the argument is not otherwise treated specially. `MAIL_WARNING (-U)' Print a warning message if a mail file has been accessed since the shell last checked. `MARK_DIRS (-8, ksh: -X)' Append a trailing `/' to all directory names resulting from filename generation (globbing). `MENU_COMPLETE (-Y)' On an ambiguous completion, instead of listing possibilities or beeping, insert the first match immediately. Then when completion is requested again, remove the first match and insert the second match, etc. When there are no more matches, go back to the first one again. `reverse-menu-complete' may be used to loop through the list in the other direction. This option overrides `AUTO_MENU'. `MONITOR (-m, ksh: -m)' Allow job control. Set by default in interactive shells. `NO_BAD_PATTERN (-2)' If a pattern for filename generation is badly formed, leave it unchanged in the argument list instead of printing an error. `NO_BANG_HIST (-K)' Do not perform textual history substitution. Do not treat the `!' character specially. `NO_BEEP (-B)' Do not beep. `NO_CLOBBER (-C, ksh: -C)' Prevents `>' redirection from truncating existing files. `>|' may be used to truncate a file instead. Also prevents `>>' from creating files. `>>|' may be used instead. `NO_EQUALS' Don't perform `=' filename substitution. `NO_EXEC (-n, ksh: -n)' Read commands and check them for syntax errors, but do not execute them. `NO_FLOW_CONTROL' Disable output flow control via start/stop characters (usually assigned to `^S'/`^Q') in the shell's editor. `NO_GLOB (-F, ksh: -f)' Disable filename generation. `NO_HIST_BEEP' Don't beep when an attempt is made to access a history entry which isn't there. `NO_HUP' Don't send the `HUP' signal to running jobs when the shell exits. `NO_LIST_BEEP' Don't beep on an ambiguous completion. `NO_MULTIOS' Don't perform implicit `tee's or `cat's when multiple redirections are attempted. *Note Redirection::. `NO_NOMATCH (-3)' If a pattern for filename generation has no matches, leave it unchanged in the argument list instead of printing an error. This also applies to file expansion of an initial `~' or `='. `NO_PROMPT_CR (-V)' Don't print a carriage return just before printing a prompt in the line editor. `NO_RCS (-f)' Source only the `/etc/zshenv' file. Do not source the `.zshenv', `/etc/zprofile', `.zprofile', `/etc/zshrc', `.zshrc', `/etc/zlogin', `.zlogin', or `.zlogout' files. `NO_SHORT_LOOPS' Disallow the short forms of `for', `select', `if', and `function' constructs. `NOTIFY (-5, ksh: -b)' Report the status of background jobs immediately, rather than waiting until just before printing a prompt. `NO_UNSET (-u, ksh: -u)' Treat unset parameters as an error when substituting. `NULL_GLOB (-G)' If a pattern for filename generation has no matches, delete the pattern from the argument list instead of reporting an error. Overrides `NO_NOMATCH'. `NUMERIC_GLOBSORT' If numeric filenames are matched by a filename generation pattern, sort the filenames numerically rather than lexicographically. `OVER_STRIKE' Start up the line editor in overstrike mode. `PATH_DIRS (-Q)' Perform a path search even on command names with slashes in them. Thus if `/usr/local/bin' is in the user's path, and he types `X11/xinit', the command `/usr/local/bin/X11/xinit' will be executed (assuming it exists). This applies to the `.' builtin as well as to command execution. Commands explicitly beginning with `./' or `../' are not subject to path search. `PRINT_EXIT_VALUE (-1)' Print the exit value of programs with non-zero exit status. `PRIVILEGED (-p, ksh: -p)' Turn on privileged mode. This is enabled automatically on startup if the effective user (group) id is not equal to the real user (group) id. Turning this option off causes the effective user and group ids to be set to the real user and group ids. This option disables sourcing user startup files. If zsh is invoked as sh or ksh with this option set, `/etc/suid_profile' is sourced (after `/etc/profile' on interactive shells). Sourcing `~/.profile' is disabled and the contents of the `ENV' variable is ignored. This option cannot be changed using the `-m' option of `setopt' and `unsetopt' and changing it inside a function always changes it globally regardless of the `LOCAL_OPTIONS' option. `PROMPT_SUBST' If set, "parameter expansion", "command substitution" and "arithmetic expansion" is performed in prompts. `PUSHD_IGNORE_DUPS' Don't push multiple copies of the same directory onto the directory stack. `PUSHD_MINUS' *Note Shell Builtin Commands::, for the `popd' command. `PUSHD_SILENT (-E)' Do not print the directory stack after `pushd' or `popd'. `PUSHD_TO_HOME (-D)' Have `pushd' with no arguments act like `pushd $HOME'. `RC_EXPAND_PARAM (-P)' Array expansions of the form `foo${xx}bar', where the parameter `xx' is set to `(a b c)', are substituted with `fooabar foobbar foocbar' instead of the default `fooa b cbar'. `RC_QUOTES' Allow the character sequence `''' to signify a single quote within singly quoted strings. `REC_EXACT (-S)' In completion, recognize exact matches even if they are ambiguous. `RM_STAR_SILENT (-H)' Do not query the user before executing `rm *' or `rm path/*'. `SH_GLOB' Disables the special meaning of `(', `|', `)' and `<' for globbing the result of parameter and command substitutions, and in some other places where the shell accepts patterns. This option is set if `zsh' is invoked as `sh' or `ksh'. `SHIN_STDIN (-s, ksh: -s)' Commands are being read from the standard input. Commands are read from standard input if no command is specified with `-c' and no file of commands is specified. If `SHIN_STDIN' is set explicitly on the command line, any argument that would otherwise have been taken as a file to run will instead be treated as a normal positional parameter. Note that setting or un-setting this option on the command line does not necessarily affect the state the option will have while the shell is running; that is purely an indicator of whether or not commands are actually being read from standard input. The value of this option cannot be changed anywhere other than the command line. `SH_WORD_SPLIT (-y)' *Note Parameter Expansion::. `SINGLE_COMMAND (-t)' If the shell is reading from standard input, it exits after a single command has been executed. This also makes the shell non-interactive, unless the `INTERACTIVE' option is explicitly set on the command line. The value of this option cannot be changed anywhere other than the command line. `SINGLE_LINE_ZLE (-M)' Use single-line command line editing instead of multi-line. `SUN_KEYBOARD_HACK (-L)' If a line ends with a back-quote, and there are an odd number of back-quotes on the line, ignore the trailing back-quote. This is useful on some keyboards where the return key is too small, and the back-quote key lies annoyingly close to it. `VERBOSE (-v, ksh: -v)' Print shell input lines as they are read. `XTRACE (-x, ksh: -x)' Print commands and their arguments as they are executed. `ZLE (-Z)' Use the zsh line editor.